﻿using System;

namespace Core.Toolkit.Core.Entitys
{
    /// 泛型实体基类
    /// </summary>
    /// <typeparam name="TPrimaryKey">主键类型</typeparam>
    public  class Entity<TPrimaryKey>
    {
        /// <summary>
        /// 主键
        /// </summary>
        public virtual TPrimaryKey Id { get; set; }


        public bool IsDeleted { get; set; }
        /// <summary>
        /// 数据插入用户
        /// </summary>
        public Guid? CreateUser { get; set; }
        /// <summary>
        /// 数据添加用户ID
        /// </summary>
        public DateTime? CreateTime { get; set; }
        /// <summary>
        /// 更改用户ID
        /// </summary>
        public Guid? UpdateUser { get; set; }
        /// <summary>
        /// 更改数据日期 
        /// </summary>
        public DateTime? UpdateTime { get; set; }

    }

    /// <summary>
    /// 定义默认主键类型为Guid的实体基类
    /// </summary>
    public  class Entity : Entity<Guid>
    {
        public Entity()
        {

        }
      
    }
}
